When an object (for example, a finger of a person) approaches or contacts a capacitance detection plate, an apparatus for detecting capacitance detects a variation in capacitance between the capacitance detection plate and the object and generates a switching signal according to the result of detection. Such a variation in capacitance is detected by an oscillation frequency. That is, when the object approaches the capacitance detection plate, the variation in capacitance between the object and the detection plate occurs and the oscillation frequency of an oscillator varies depending on the capacitance of the detection plate. The oscillation frequency is counted by a frequency counter and compared with a predetermined reference count value and the switching signal according to the contact or the approach of the object is generated.
However, a variation speed of the oscillation frequency of the oscillator varies depending on external wireless noise which is unexpectedly applied, in addition to the variation in capacitance caused by the object which approaches the detection plate. In addition, the oscillation frequency of the oscillator varies even when external electric noise is suddenly applied to a power supply line connected to the oscillator.
FIGS. 1 to 4 are views illustrating a conventional single triangle wave oscillator.
FIG. 1 shows a circuit for generating reference current Is, which is determined by a resistor R.
FIG. 2 shows a circuit for determining a direction charge/discharge current. When a voltage charged in a capacitor Cx is larger than Vref+, a discharge is continuously performed until the voltage reaches Vref−, and, when the voltage reaches the Vref−, a charge is performed. The charge and discharge are repeated so that oscillation occurs. The capacitor Cx indicates a capacitor formed in the capacitance detection plate.
FIG. 3 shows a voltage waveform charged/discharged to/from the capacitor Cx of FIG. 2 and a charge/discharge signal which passes through voltage comparators U1A and U2A and a flip-flop FF. The charge/discharge voltage waveform has a triangular shape and the charge/discharge signal has a rectangular shape. The oscillation frequency varies depending on the reference current Is, the charge and discharge reference voltages Vref+ and Vref−, the delay of the charge/discharge switch FF and the value of the capacitor Cx of the detection plate.
FIG. 4 is a circuit diagram showing an output terminal of an oscillator. When the reference current Is and the charge signal (high voltage) are input, a transistor M9 is turned on such that the reference current Is outputs to a current output port. When the discharge signal (low voltage) is input, the transistor M9 is turned off and a transistor M11 is turned on such that the reference current Is is discharged to earth through the current output port.
The oscillation frequency of the oscillator is approximately defined to Is/(2*Vth*Cx). Here, Vth is (Vref+−Vref−)/2. Accordingly, the oscillator is generally designed such that the oscillation frequency varies depending on the value of the capacitor Cx. However, when the capacitance detection plate is influenced by strong external noise, the oscillation frequency follows the frequency of the external noise due to the external noise.
FIG. 5 shows a model in which external noise is applied to the capacitor Cx of the capacitance detection plate. The external noise is determined by a virtual parasitic capacitor Cp and the intensity of noise V1.
FIG. 6 is a graph showing a phenomenon that the oscillation frequency of the oscillator is distorted by the external noise Cp and V1 when the oscillation frequency is 33 MHz and the external noise is applied through the capacitor Cp in a sine form while varying in a range from 1 MHz to 63 MHz.
As shown in FIG. 6, the distortion of the oscillation frequency significantly decreases when the frequency of the external noise is distant from 33 MHz and increases when the frequency of the external noise is close to 33 MHz. When the frequency of the external noise is very close to 33 MHz, the oscillation frequency follows the external noise component and then the distortion gradually decreases.
As described above, in the conventional single triangle wave oscillator, since the oscillation frequency significantly varies depending on the external noise, the oscillation frequency according to the variation in the capacitance Cx cannot be accurately obtained and an error occurs at the time of the detection of the capacitance.